import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
import axios from 'axios'

Vue.use(Antd)

Vue.config.productionTip = false

// axios.defaults.baseURL = 'http://192.168.0.103:3000/'
axios.defaults.baseURL = 'http://127.0.0.1:3000/'
// axios.defaults.baseURL = 'http://47.240.7.47:3000/'
axios.interceptors.response.use(function (response) {
  let data = response.data
  if (data.code !== 200) {
    return Promise.reject(data)
  }
  return data
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
